package com.nacos.temp4.controller;

import com.nacos.temp4.confdat.NacosConfigData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dynamic")
public class ConfigRestController {

    @Autowired
    protected NacosConfigData nacosConfigData;

    /**
     * http://127.0.0.1:8282/dynamic/value
     */
    @GetMapping("/value")
    public String readValue() {
        return nacosConfigData.getBizSupplierAddr();
    }

}
